package cn.wolfcode.web.modules.custlinkman.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.TableField;
import link.ahsj.core.annotations.AddGroup;
import link.ahsj.core.annotations.UpdateGroup;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 客户联系人
 * </p>
 *
 * @author haiyang
 * @since 2022-10-09
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class TbCustLinkman implements Serializable {

    private static final long serialVersionUID = 1L;

    private String id;

    /**
     * 客户id
     */
    @Excel(name = "联系人id")
    @NotBlank(message = "请选择客户",groups = {AddGroup.class, UpdateGroup.class})
    private String custId;

    @TableField(exist = false)
    private String customerName;

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }


    /**
     * 联系人名字
     */
    @Excel(name = "联系人名字")
    @NotBlank(message = "请填写联系人名字",groups = {AddGroup.class, UpdateGroup.class})
    @Length(max = 30,message = "联系人名字不能超过30个字",groups = {AddGroup.class,UpdateGroup.class})
    private String linkman;

    /**
     * 性别 1 男 0 女
     */
    @Excel(name = "性别")
    @NotNull(message = "请填写性别",groups = {AddGroup.class, UpdateGroup.class})
    private Integer sex;

    /**
     * 年龄
     */
    @NotNull(message = "请填写年龄",groups = {AddGroup.class, UpdateGroup.class})
    private Integer age;

    /**
     * 联系人电话
     */
    @NotBlank(message = "请填写联系人电话",groups = {AddGroup.class, UpdateGroup.class})
    @Length(max = 20,message = "联系人电话不能超过20个字",groups = {AddGroup.class,UpdateGroup.class})
    private String phone;

    /**
     * 职位
     */
    @Length(max = 20,message = "职位不能超过20个字",groups = {AddGroup.class,UpdateGroup.class})
    private String position;

    /**
     * 部门
     */
    @Length(max = 20,message = "部门不能超过20个字",groups = {AddGroup.class,UpdateGroup.class})
    private String department;

    /**
     * 备注信息
     */
    private String remark;

    /**
     * 录入人
     */
    private String inputUser;

    /**
     * 录入时间
     */
    private LocalDateTime inputTime;


}
